<template>
  <div>
    <!-- <a href="/pages/counter/main">跳转到vuex</a>
   <ul>
     <li v-for="data in datalist" :key ="data.filmid"></li>
   </ul> -->
   首页
  </div>
</template>

<script>
export default {
  data(){
    return {
      datalist:[]
    }
  },
  mounted() {
    mpvue.request({
      url:'',
      success:(res)=>{
        console.log(res.data)
        this.datalist = res.data
      }
    })
  },
  onPullDownRefresh(){
    setTimeout(() => {
      mpvue.stopPullDownRefresh()
    }, 2000);
    
  },
  onReachBottom(){
    console.log("到底了");
    mpvue.request({
      url:'',
      success:(res)=>{
        console.log(res.data)
        // 到底后更新数据添加到数组
        // this.datalist = [...this.datalist,...res.data.data.films]
      }
    })
    
  }

}
</script>

<style scope>

</style>
